<?php


/**
 * @package memoryusage
 *
 * @author DE-0095
 */
/**
 * geeft weer hoeveel geheugen er in gebruik is
 */
class MemoryUsage {
    static function getUsage(){
        return MemoryUsage::convert(memory_get_usage(true));
    }
    static function convert($size){
            $unit=array('b','kb','mb','gb','tb','pb');
    return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];

    }
}
?>
